
#ifndef _Precompile_header
#define _Precompile_header


#define cpAssertWarn(__condition__, ...) if(!(__condition__)) cpMessage(#__condition__, __FILE__, __LINE__, 0, 0, __VA_ARGS__)

//#define CP_PRIVATE(__symbol__) __symbol__  1

#define CP_PRIVATE(__symbol__) __symbol__##_private

#define toString(sting) #sting
#define symbolConcat(a,b) a##b

#define MAKE_REF(name) __typeof__(name) *_##name = name

#define MAKE_PROPERTIES_REF(struct, property) \
	MAKE_REF(struct##Get##property); MAKE_REF(struct##Set##property)

//预编译能成功，但编译失败. 这个相当于声明函数的指针，所以要先定义函数
// MAKE_REF(cpBodyGetMass);
// MAKE_REF(cpBodyGetMoment);
// MAKE_REF(cpBodyGetPos);
// MAKE_REF(cpBodyGetAngle);
// MAKE_REF(cpBodyGetRot);
// MAKE_PROPERTIES_REF(cpBody, Vel);
// MAKE_PROPERTIES_REF(cpBody, Force);
// MAKE_PROPERTIES_REF(cpBody, AngVel);
// MAKE_PROPERTIES_REF(cpBody, Torque);
// MAKE_PROPERTIES_REF(cpBody, VelLimit);
// MAKE_PROPERTIES_REF(cpBody, AngVelLimit);
// MAKE_PROPERTIES_REF(cpBody, UserData);



//static inline test

static inline 
int max(int a,int b) 
{
	return a>b?a:b;
}


#endif